<html>
<head>
	<title>[[title]]</title>
	<script src="[[url]]libs/swfobject.js"></script>
	<script src="[[url]]libs/downloadify.min.js"></script>
</head>
<body>
	<div id='downloadify'></div>
<script type="text/javascript">
	Downloadify.create('downloadify',{
		filename: '[[filename]]',
		data: function(){
			return document.getElementById('data').innerText;
		},
		onComplete: function(){ 
			alert('Your File Has Been Saved!'); 
		},
		onCancel: function(){ 
			alert('You have cancelled the saving of this file.');
		},
		onError: function(){ 
			alert('You must put something in the File Contents or there will be nothing to save!');
		},
		transparent: false,
		swf: '[[url]]media/downloadify.swf',
		downloadImage: '[[url]]/images/download.png',
		width: 100,
		height: 30,
		transparent: true,
		append: false
	});
</script>
<pre id="data">[[data]]</pre>
</body>
</html>
